import forgery_py
from werkzeug.security import generate_password_hash

from application import db
from application.users.models import *

def generate_users(count=200):
	for i in range(200):
		print(i)
		fullname = forgery_py.name.full_name()
		username = forgery_py.internet.user_name()
		password = generate_password_hash('123456')
		user = Users(username=username, fullname=fullname, password=password)
		db.session.add(user)
		try:
			db.session.commit()
		except Exception as e:
			db.session.rollback()
